<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <!-- 浏览器中弹出对话框：请输入姓名
      页面中输出：刚才输入的姓名
  -->
  <script>
    let uname = prompt("请输入的你的姓名：")
    document.write(uname)
  </script>
</body>

</html>